﻿using LoggerDemo;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

var services = new ServiceCollection();
services.AddLogging(configure => configure.AddConsole());
services.AddTransient<OrderJob>();
using (ServiceProvider serviceProvider = services.BuildServiceProvider())
{
    var orderJob = serviceProvider.GetService<OrderJob>()!;
    orderJob.Execute();
}